/**************************************************************************
 *
 * Copyright 2014 MaeckySoft Ltd., Bludenz, Austria.
 * All Rights Reserved.
 *
 **************************************************************************/

#ifndef MPNG_H
#define MPNG_H

#define MPNG_RGBA 4
#define MPNG_RGB  3

#include <M3DBase.h>

class MPNG : M3DBase
{
    public:
        MPNG(int iDebug);
        MPNG(int iWidth, int iHeight, int iDebug);
        MPNG(int iWidth, int iHeight, int iFormat, int iDebug);
        MPNG(int iWidth, int iHeight, int iFormat, unsigned char *szImageBuffer, int iDebug);

        ~MPNG();
        void setSize(int iWidth, int iHeight);
        void setFormat(int iFormat);
        void setBuffer(unsigned char *szImageBuffer);
        unsigned char *getBuffer();
        int getFormat();
        int getWidth();
        int getHeight();
        int writeFile(std::string sFilename);
        void init(int iWidth, int iHeight, int iFormat, unsigned char *szImageBuffer);
		void printMethodInfo(std::string method);
    protected:
    private:
        unsigned char *m_sBuffer;
        int m_iWidth;
        int m_iHeight;
        int m_iFormat;

};

#endif // MPNG_H
